Macromedia Pollster
Macromedia Pollster is a hybrid ColdFusion and Macromedia Flash application that easily lets you to create and deploy polls and polling results to your website. Pollster consists of a ColdFusion-based administration interface for managing polls and a Macromedia Flash movie that users interact with to submit answers and view poll results.
Part I. Installing and Using Macromedia Pollster
Pollster is extremely simple to install and configure. After you unzip pollster.zip into a single folder called "pollster," copy the entire folder into your web root. If your web root is located here:
C:\CFusionMX\wwwroot
You should locate the pollster folder here:
C:\CFusionMX\wwwroot\pollster
Now just configure a ColdFusion data source and you're ready to go. Log in to the ColdFusion Administrator and create a Microsoft Access data source called "pollster." It should point to the database file located here:
pollster\db\pollster.mdb
Note: You should not use Microsoft Access in a high-traffic production environment. In such a case, move pollster.mdb out of your web root so that it is not web-accessible. Additionally, there are scripts in the db folder for building a PostgreSQL database, or you could import the Access database into Microsoft SQL Server. We did not include a build script for MySQL because Pollster uses subselects, which are not yet supported in full releases of MySQL.
If you are running ColdFusion for J2EE and you must include a context root such as "cfusion" in your requests for ColdFusion files, make two adjustments to Pollster's Application.cfm file (located in pollster/Application.cfm). Insert the correct context root into the value of the "application.cfmPath" and "application.gateway" variables so that they look like this:
application.cfmPath = "/myContextRoot/pollster"; application.gateway = "/myContextRoot/flashservices/gateway";
Make sure the value of the application.gateway variable in Application.cfm points to the Flash Remoting gateway on your server. The default value is http://127.0.0.1:8500/flashservices/gateway/, which is a common setting for development configurations (although you may need to change the port number from 8500 to whatever port ColdFusion runs on). In a production environment, make sure the gateway variable points to the name of your production server. If ColdFusion runs on port 80, leave the port number out altogether.
Once you configure your data source and the pollster folder is in your web root (and you've edited Application.cfm, if necessary) you are ready to go. Go to the following page with your browser to get started:
http://localhost[:8500][/contextRoot]/pollster/index.cfm
Note: Pollster has built-in web authentication, so your browser will prompt you for a username and a password. The default username is "macromedia" and the default password is "pollster". You can change these values in Application.cfm. The username and password strings are expressed as MD5 hashes in Application.cfm for extra security. To get the MD5 hash of your new username and password, use the built-in ColdFusion hash() function. If you would rather not use encrypted strings, simply remove the hash function calls from around cflogin.name and cflogin.password.
Note about Pollster and ColdFusion MX "Red Sky": Unix users need ColdFusion MX "Red Sky" for Pollster to work properly because Pollster's use of mixed-case component names is not supported by ColdFusion releases prior to Red Sky. If you are using a preāRed Sky release, either create all lowercase symbolic links to the mixed-case component names (use links rather than renaming components) or, better yet, upgrade to Red Sky. It's free! Also, Pollster's database transactions will not be completely secure on ColdFusion releases prior to Red Sky. Although the application still works, transactions will not be rolled back properly in the event of an error.
Using the Macromedia Pollster Administration Interface
The Pollster administration interface is straightforward and easy to use. With it you create, edit, view, and delete polls, as well as view statistics on poll results, generate tags to embed polls in your website, and export poll data in Microsoft Excel format. The interface is pretty intuitive; you'll be able to create a couple of test polls in no time.
When you create a poll, you can check the "Restricted" option. Restricting a poll makes Pollster accept only a single response from a particular client per poll. In other words, responders to a poll cannot submit additional responses to that particular poll. However, they can submit responses to other Pollster polls.
Note: Pollster uses a hash, or an encoded numeric representation, of a user's IP address, browser type and version, and an arbitrary unique ID stored in a cookie to determine if a particular client has previously responded to a specific poll. Although this method is fairly reliable, it is by no means foolproof. Keep this fact in mind when you view poll results.
You also have the option of making an active or inactive poll. Inactive polls should not be deployed because the poll question and options cannot be viewed through the Macromedia Flash interface, and users cannot respond to inactive polls. Making a poll inactive is a good way to prevent accepting additional responses without actually deleting the poll.
Deploying Macromedia Pollster Polls
There are two ways to deploy the Pollster user interface. The first, and easiest, way is to install and use the Pollster Dreamweaver extension included on DevNet Resource Kit (DRK) Volume 4. See "Inserting the Macromedia Flash Poll into a Web Page" later for more details.
The second method is to create manually the necessary HTML to deploy the Macromedia Flash interface. This method is described in detail in Part III.
Table of Contents
- Part II. How the Pollster Administration Interface Works
- Part III: How the Macromedia Flash Polling Application Works